package com.ykg.enums;

import lombok.Getter;

/**
 * TODO
 * 类(接口)：
 * Created on 8:22 2021/6/23.
 *
 * @Author: laobian
 * @Description:
 */
@Getter
public enum ResultEnum {
    SUCCESS(0, "成功"),
    FAILURE(1,"失败"),

    PARAM_ERROR(400, "参数异常"),
    TOKEN_ERROR(500, "token失效，请重新登陆"),
    UPDATE_ERROR(500, "更新失败"),

    SIGN_ERROR(500, "获取签名失败"),
    NULL(501,"返回为空"),

    /* -----------------登陆相关------------------------- */
    LOGIN_ERROR(5000, "用户名或密码不正确"),
    USER_EXIST(5001, "用户已存在"),
    USER_NOT_EXIST(5002, "用户不存在"),
    PASSWORD_ERROR(5003, "密码不正确"),


    /*-----------------权限相关----------------------*/
    TYPE_ERROR(6000,"用户身份错误");

    private final int code;
    private final String msg;

    ResultEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
